//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.plexpt.chatgpt.entity.chat;

import com.plexpt.chatgpt.entity.billing.Usage;
import lombok.Data;

import java.util.List;

@Data
public class ChatCompletionResponse {
    private String id;
    private String object;
    private long created;
    private String model;
    private List<ChatChoice> choices;
    private Usage usage;

    private String system_fingerprint;
    public ChatCompletionResponse() {
    }

    public String getId() {
        return this.id;
    }

    public String getObject() {
        return this.object;
    }

    public long getCreated() {
        return this.created;
    }

    public String getModel() {
        return this.model;
    }

    public List<ChatChoice> getChoices() {
        return this.choices;
    }

    public Usage getUsage() {
        return this.usage;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setObject(String object) {
        this.object = object;
    }

    public void setCreated(long created) {
        this.created = created;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public void setChoices(List<ChatChoice> choices) {
        this.choices = choices;
    }

    public void setUsage(Usage usage) {
        this.usage = usage;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof ChatCompletionResponse)) {
            return false;
        } else {
            ChatCompletionResponse other = (ChatCompletionResponse)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (this.getCreated() != other.getCreated()) {
                return false;
            } else {
                label73: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label73;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label73;
                    }

                    return false;
                }

                Object this$object = this.getObject();
                Object other$object = other.getObject();
                if (this$object == null) {
                    if (other$object != null) {
                        return false;
                    }
                } else if (!this$object.equals(other$object)) {
                    return false;
                }

                label59: {
                    Object this$model = this.getModel();
                    Object other$model = other.getModel();
                    if (this$model == null) {
                        if (other$model == null) {
                            break label59;
                        }
                    } else if (this$model.equals(other$model)) {
                        break label59;
                    }

                    return false;
                }

                Object this$choices = this.getChoices();
                Object other$choices = other.getChoices();
                if (this$choices == null) {
                    if (other$choices != null) {
                        return false;
                    }
                } else if (!this$choices.equals(other$choices)) {
                    return false;
                }

                Object this$usage = this.getUsage();
                Object other$usage = other.getUsage();
                if (this$usage == null) {
                    if (other$usage != null) {
                        return false;
                    }
                } else if (!this$usage.equals(other$usage)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof ChatCompletionResponse;
    }

    public int hashCode() {
        int result = 1;
        long $created = this.getCreated();
        result = result * 59 + (int)($created >>> 32 ^ $created);
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $object = this.getObject();
        result = result * 59 + ($object == null ? 43 : $object.hashCode());
        Object $model = this.getModel();
        result = result * 59 + ($model == null ? 43 : $model.hashCode());
        Object $choices = this.getChoices();
        result = result * 59 + ($choices == null ? 43 : $choices.hashCode());
        Object $usage = this.getUsage();
        result = result * 59 + ($usage == null ? 43 : $usage.hashCode());
        return result;
    }

    public String toString() {
        return "ChatCompletionResponse(id=" + this.getId() + ", object=" + this.getObject() + ", created=" + this.getCreated() + ", model=" + this.getModel() + ", choices=" + this.getChoices() + ", usage=" + this.getUsage() + ")";
    }
}
